1. Field of the Invention
The present invention relates to an interpolation apparatus for an encoder, a controlling method of an interpolation apparatus for an encoder, and a non-transitory storage medium storing a controlling program of an interpolation apparatus for an encoder.
2. Description of the Related Art
There is known a device called an encoder which generates a sine wave signal and a cosine wave signal that are 90° different in phase from each other in accordance with the movement of a measurement object, digitizes each of the signals on the basis of a standard value, and counts the changes of each of the digitized signals to detect a movement amount.
Moreover, various interpolation methods have been suggested as methods of increasing the resolution of an encoder. For example, according to an interpolation method in Jpn. Pat. Appln. KOKAI Publication No. 2-186221, a sine component signal and a cosine component signal which are two signals are converted into polar coordinates, and angular information in the polar coordinates is used to conduct an interpolation that splits one sine-wave-shaped cycle by the following means: means for converting a sine component and a cosine component into digital quantities; means for calculating an angle and a radius of polar coordinates of a detection signal from the sine component and the cosine component that have been converted into digital quantities; and means for splitting and thus interpolating one cycle of the detection signal by using angular information in the polar coordinates.
An interpolation method in Jpn. Pat. Appln. KOKAI Publication No. 2-38814 previously calculates phase angle data corresponding to a sine component signal and a cosine component signal and then stores the phase angle data in a storage element, and uses the sine component signal and the cosine component signal as address signals to read the corresponding phase angle data from the storage element.
The method described above requires a solution to be found by complicated computations, and has various problems such as the decrease of response and the increase of cost which is caused by use of a separate storage element.
To solve the problems, an interpolation method in Jpn. Pat. Appln. KOKAI Publication No. 2007-178170 multiplies the amplitude amount of one of a sine wave signal and a cosine wave signal by an interpolation position parameter corresponding to a tangent value in each interpolation position in accordance with the number of interpolations of the phase angles of the sine wave signal and the cosine wave signal, compares the absolute value of this signal with the absolute value of the other signal for each interpolation position to see which is higher, and on the basis of the comparison result, estimates a region in which the phase angles of the sine wave signal and the cosine wave signal exist and which is separated by the interpolation positions. This suppresses the cost increase and enables higher response.
The interpolation method in Jpn. Pat. Appln. KOKAI Publication No. 2007-178170 has no particular problem when the number of splits to interpolate is small. However, when the number of calculations to multiply increases with the number of splits, the number of comparisons to compare the values to see which is higher also increases, so that the increase of the circuit scale is a practical problem. When the method described above is configured by software, the number of calculations also increases, so that the deterioration of response is a practical problem.
Furthermore, the use amount of a multiplying circuit and a comparator or the calculation amount in the case where the multiplying circuit and the comparator are configured by software is determined by the number of splits. Therefore, it is impossible to change a detection resolution in accordance with a detection target or the situation.